﻿using DAL;
using Model;

namespace BLL
{
    public class HuiyuanBLL
    {
        public HuiyuanBLL (HuiyuanDAL huiyuanDAL)
        {
            HuiyuanDAL = huiyuanDAL;
        }
        public HuiyuanDAL HuiyuanDAL { get; }

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="huiyuan"></param>
        /// <returns></returns>
        public int Add(Huiyuan huiyuan)
        {
            try
            {
                
                return HuiyuanDAL.Add(huiyuan);
            }
            catch (Exception)
            {

                throw;
            }
        }
        /// <summary>
        /// 显示
        /// </summary>
        /// <returns></returns>
        public List<Huiyuan> GetHuiyuans()
        {
            try
            {
                return HuiyuanDAL.GetHuiyuans();
            }
            catch (Exception)
            {

                throw;
            }
        }
        //修改
        public int Update(Huiyuan huiyuan)
        {
            try
            {
                
                return HuiyuanDAL.Update(huiyuan);
            }
            catch (Exception)
            {

                throw;
            }
        }
    }
}
